home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-22 | 35.5 KB | 1,053 lines |
-
-
- ≡TABLE OF CONTENTS≡
-
-
-
- ≡INSTALLATION≡
- Disclaimer
- As an accessory
- As a GEM program
-
- ≡ABOUT GREPIT≡
- Overview
- Support
- Credits
-
- ≡GETTING STARTED≡
- As an accessory
- As a GEM program
-
- ≡USE OF DIALOG BOXES≡
-
- ≡USE OF OUTPUT WINDOW≡
-
- ≡THE MAIN DIALOG≡
- Source(s)
- Destination
- Expression
- Options
- The Popups (The history function)
-
- ≡'EXTENDED OPTIONS' DIALOG≡
-
- ≡'SETTINGS' DIALOG≡
-
- ≡'FONT' DIALOG≡
-
- ≡'COLORS' DIALOG≡
-
- ≡'FIND' DIALOG≡
-
- ≡'MARK EXPRESSION' DIALOG≡
-
- ≡'PRINTER SETTINGS' DIALOG≡
-
- ≡'PRINT' DIALOG≡
-
- ≡REGULAR EXPRESSIONS≡
-
- ≡SPECIAL FEATURES≡
- Messages from GREPIT to other programs
- Messages from other programs to GREPIT
-
- ≡EXAMPLES, TIPS AND TRICKS≡
- Converting to and from UNIX
- Extracting of strings or comments
- Search by using expression files (lists)
- GREPIT as a file finder
-
- ≡KEYBOARD SHORTCUTS≡
-
- ≡HELP ON HELP≡
-
- ≡GETTING REGISTERED≡
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡INSTALLATION≡
-
-
- ∙Disclaimer∙
-
- MicroService H. Wierl makes no representation or warranty with respect
- to the adequacy of this documentation or the programs which it describes
- for any particular purpose or with respect to its adequacy to produce
- any particular result. In no event shall MicroService H. Wierl be
- liable for special, direct, indirect or consequentional damages, losses,
- costs, charges, claims, demands, or claim for lost profits, fees or
- expenses of any nature or kind.
-
-
- You need, at least, the following files to work with GREPIT:
-
- GREPIT.ACC (or GREPIT.PRG or GREPIT.APP)
- GREPIT.RSC
- GREPIT.HLP
-
- If there's no GREPIT.HLP there's no help period! Got it? Good ...
-
- Just put the three files together in the one (sub-)directory, because
- GREPIT loads them from the same directory where it started from. GREPIT
- automatically recognizes whether it is an accessory or a normal program.
- On Atari TT-models, the TT-Ram-Bits in the program header can (should)
- be set for maximum performance (i.e. warp 9.9).
-
-
- ∙As an Accessory∙
-
- Copy GREPIT.PRG (with GREPIT.RSC and GREPIT.HLP of course) to the root
- directory of your boot partition and rename it to GREPIT.ACC.
-
-
- ∙As a GEM Program∙
-
- You may copy GREPIT to whatever (sub-)directory you like. Use .PRG or
- .APP for the extension.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡ABOUT GREPIT≡
-
-
- ∙Overview∙
-
- The program GREPIT is used for pattern matching and string searching in
- files. Through the use of regular expressions GREPIT can provide you
- with search patterns however complex they may be. These patterns can be
- searched for in all types of files.
-
- GREPIT also provides you with many options to vary or specify search
- and output. GREPIT is a powerful tool mainly for those who deal with
- many texts, as in the fields of software development or electronic mail
- /communication etc.
-
- GREPIT reads files line by line and searches for the pattern. Lines
- with possible matches are shown in the output window and written to
- the specified output file.
-
- GREPIT lets you easily jump into (and back) the found files just by
- clicking on a file path or line number in the output window.
-
- GREPIT is (or will soon be) available for various platforms in addition
- to Atari TOS as MS-DOS, MS Windows, Windows NT, OS/2, NeXTstep, Apple,
- Unix ...
-
- HINT! Don't be surprised if the pattern you are searching for is not
- found on the first try. Be especially careful when using regular
- expressions, for the outcome may be unexpected!
-
- Please thoroughly analyze your search pattern and the outcoming line,
- before you verbally abuse GREPIT. Ha Ha ...
-
- But! If by chance GREPIT misinterprets a regular expression, please
- advise us of this and or any other malfunction (hopefully not ;-)).
-
- Many "extras" are featured in this warp speed fast, 110% reliable,
- schwarzenegger powerful and easy to relate to, grep utility. But sorry
- dude, you must consult this help function from the beginning to the
- bitter end to know what the hell we are talking about! So read on and
- we'll make it entertaining. It's worth it, believe us ...
-
-
- ∙Support∙
-
- Full support is available to registered users only. Please tell us
- your serial number when contacting us with questions or problems.
- Error reports or suggestions are welcome.
-
- Our adress is:
-
- MicroService Hermann Wierl
- Bahnhofstrasse 8
- 93336 Altmannstein
- GERMANY
- MO-FR 9-12 a.m. and 2-5 p.m. CET
-
- Phone and FAX: +49-9446-2149
- E-Mail: CompuServe 100345,2231
-
- The latest version of GREPIT is periodically uploaded to CompuServe
- (ATARIPRO forum, Library #3 "Programming Tools" and Library #4 "Utility
- Programs") and can also be requested at Fido Node 2:2494/315 (Support
- BBS, Phone +49-9405-7278).
-
- The archive filenames are should normally be:
- GREPIT.LZH for Atari TOS (german and english),
- GREPIT.ARJ for MS-DOS ( " " " ),
- GREPIT.ZIP for Windows/Windows NT ( " " " ).
-
- The authors can also be contacted via private E-Mail adresses:
- Hermann Wierl @ R (MausNet Germany),
- Hermann Wierl @ 2:2494/315 (FidoNet),
- which look like this as Internet adresses:
- hermann_wierl@r.maus.de
- hermann_wierl@f315.n2494.z2.fidonet.org
-
-
- ∙Credits∙
-
- Special Thanx to:
-
- Rita Bergbauer, for the everything-except-computer-support for one
- half of the author team,
- Alison Easton, for English language support and the above mentioned
- for the second half of the author team as well as
- explaining some Beavis and Butthead jokes ;-),
- Hermann Weindl, for permanent puzzling over algorithms,
- Max Heinzlmeir, for his patience in never ending beta tests,
- Gerhard and Martin Huber of Computerislands Bad Gogging for their
- fantastic NOVA graphic cards.
-
- Bug reports (especially if you live in Florida - we know how big those
- bugs can get) and suggestions for future improvements are welcome and
- appreciated! So don't be shy...
-
-
- That's all folks. C-ya! Wouldn't wanna B-ya!
-
-
- Wolfgang Schamberger Hermann Wierl
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡GETTING STARTED≡
-
-
- ∙As an Accessory∙
-
- Choose "Grepit" in the accessory menu. Oooops! Of course... duh!
- I kill me!
-
-
- ∙As a GEM Program∙
-
- Like every other program you start GREPIT by double clicking on the
- icon or the program name on your desktop. Did you expect something
- else? Sorry, couldn't resist... a duh!
-
- Did I forget to mention that you first must switch on your computer?
- Ok, let's forget this chapter and continue on...
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡USE OF DIALOG BOXES≡
-
-
- Most aspects of dialog boxes can be used also with keyboard. If there is
- an underlined character in a selectable object, just press "Alternate"
- along with this character. Exceptions to this rule are the [Cancel]
- button, which can be activated by the "Undo" key, and the [?] button
- which corresponds with the "Help" key.
-
- Since dialog boxes are shown in windows, they are moveable like windows.
- Clean 'em from time to time and don't break 'em! (I know, I know, I
- don't do windows!)
-
- Edit Fields
-
- You can place the cursor into each edit field by clicking the left mouse
- button, using the Up/Down arrow keys or the combination Tab/Shift-Tab.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡USE OF OUTPUT WINDOW≡
-
-
- It is a standard GEM-Window, which also can be used with the keyboard:
-
- Arrow up : scroll up
- Arrow down : scroll down
- Arrow right : scroll right
- Arrow left : scroll left
- Shift and arrow keys: page scroll
- ClrHome : beginning of the file
- Shift-ClrHome : end of the file
- Control-ClrHome : adjust window size to maximum and back
- Control-F : find expression in window
- Control-G : repeat find
- Control-P : print file
- Control-U : close window
-
-
- Special features:
-
- Double click (left mouse button) on a complete file path:
- GREPIT displays this file.
- Double click (left mouse button) on a line number:
- GREPIT displays this file beginning with this line.
-
- If the double click is neither on a file path nor on a line number,
- basically you 're not in Kansas anymore Dorothy! But, GREPIT will
- help you out by displaying the "Find" dialog.
-
- You return to the previous file either by double clicking the right
- mouse button or the "Undo" key. There's no place like home!
-
- Brackets surrounding the file path in the window title notify you
- of reading a subfile not the main file, use this as a reminder.
-
- The above features mentioned can only be used in the main file, not
- (yet) in a subfile.
-
- If our shell M>DESK is acivated, you can drag a file from any M>DESK
- window and drop it onto the GREPIT window and GREPIT will display the
- file. Double clicking on a file path in GREPIT with the right mouse
- button passes this file to M>DESK. Other protocolls will be implemented
- upon demand.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡THE MAIN DIALOG≡
-
-
- This dialog is the actual center of GREPIT. Here the search process
- starts after the input of source, destination and expression. History
- popups and the most important options are available here. Batteries
- not included!
-
-
- ∙Source(s)∙
-
- You have the following possibilities to specify the source files:
-
- C:\DIR\FILE.EXT : The file C:\DIR\FILE.EXT is used for search.
-
- C:\DIR\*.EXT : All files in the directory C:\DIR with the
- extension .EXT are used for search.
-
- C:\DIR\*.* : All files in the directory C:\DIR are used for
- search.
-
- [CDE]:\*.EXT or
-
- [C-E]:\*.EXT : All files on the drives C:, D: and E: with the
- extension .EXT are used for search.
-
- [C-E]:\*.[E?T|H] : All files on the drives C:, D: and E: with the
- extension .E?T or .H are used for search. Up to
- 20 different extensions are possible, including
- wildcards.
-
- You can access the file selector by double clicking left or single
- clicking right in the source edit field to choose a path or a file.
-
-
- ∙Destination∙
-
- GREPIT won't work without giving it a destination file for output.
- You have the following possibilities to specify the output file:
-
- C:\OUTPUT.DAT : The file OUTPUT.DAT is created on drive C:.
-
- OUTPUT.DAT : The file OUTPUT.DAT is created in the current
- directory.
-
- CLIP : The file SCRAP.TXT is created in the directory CLIPBRD
- on drive C:. If this directory doesn't exist yet,
- GREPIT creates it. Instead of CLIP you can also type
- CLIPBOARD or CLIPBRD (the case will be ignored). If
- there's no drive C:, the output file will be created
- on the drive where GREPIT has been started from.
-
- You can access the file selector by double clicking left or single
- clicking right in the destination edit field to choose the destination
- file.
-
- PAY ATTENTION NOW:
-
- GREPIT does not validate the destination file name for invalid
- characters. Please use valid file names only!
-
-
- ∙Expression∙
-
- GREPIT supports regular expressions known from UNIX operating systems.
- Regular expressions are specified by giving special meanings to some
- characters, like * or ? in command shells. For more details see "REGULAR
- EXPRESSIONS".
-
- NOTE: There are two ways to make GREPIT search for several expressions
- at the same time: (Wow Wee Man)
-
- 1. Use the OR symbol "|" to separate expressions in the input line.
-
- 2. Write all expressions line by line into a file and use the extension
- .GRE (GRepit Expressions) for it. Simply type the file's name in the
- expression input line and then activate the switch "-f" in the
- "Extended Options" dialog.
- You can find some examples for expression files in the directory
- GRE on the original disk.
- An expression file may contain up to 256 lines with a maximum length
- of 256 characters each.
-
- You can access the file selector by double clicking left or single
- clicking right in the expression edit field to choose an expression
- file (the given default extension is set to .GRE).
-
- Format of expression files:
-
- --------------------------------------------------------------------
- Expression1
- Expression2
- Expression3|Expression4
- ...
- ...
- ...
- Expression256
- --------------------------------------------------------------------
-
-
- ∙Options∙ (I think you understand this term)
-
- -b (binary) : Binary data is skipped. Know what I mean Vern?
-
- -d (directory): The subdirectories of the given or current directory
- are also searched for.
-
- -e (extended) : Extended output format. The output file will have a
- short heading and a small statistic at the end (the
- heading at the beginning, of course!!!).
-
- -i (ignore) : Capital and small letters are not important. So don't
- worry, be happy!
-
- -r (regular) : Checked : The expression is interpreted as a regular
- expression.
- Not checked: The expression stays uninterpreted.
-
- The OR character is reserved for separating expressions.
- If you want to search for this character, you must use
- a regular expression for it, which is: "\|".
- Example: You search for "||".
- Expression = "\|\|"
- (The chick translating doesn't get it either so
- forgetaboutit!)
-
- -v (verbose) : The output is "outputted" on the output device. Well,
- actually I just want to say the output that's on the
- output device is outputted, too. Get it, got it, good!
- I think I need a drink ...
- Hint: Aaaahhh hhhmmmmmm uuuuhhhhh ..... ??????
-
-
- Upper/Lower Context
-
- Enter the number of lines you want to see above and below the actual
- line found.
-
- You can access a bunch of additional options by using the [Extended
- Options] button in the main dialog or the menu item. For description
- see "EXTENDED OPTIONS".
-
-
- ∙The Popups∙ (what she likes most, and I'm not talkin' baseball, boys!)
-
- For source, destination and expression there are two history buttons
- provided at the right:
-
- Automatic history function:
- The left button. Stores the last inputs automatically; up to 15 lines.
-
- Manual (permanent) history function:
- The right button. This popup contains input made by the user.
-
- To store an entry into the permanent history popup, position the cursor
- onto source, destination or expression edit field and press the "Insert"
- key. Then just select a free entry in the popup.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡'EXTENDED OPTIONS' DIALOG≡
-
-
- -a (append): The output is appended to the previous file. For the
- meaning of "to append" we recommend Webster's.
-
- -c (count) : Ok 1 2 3 4 5 6 7 8 9 10 ..... Now backwards! Only the total
- number of found lines is shown.
- Example: C:\DIR\TEST.TXT
- 15 matches.
-
- -f (file) : The expressions are taken from a seperate file. Write the
- file name into the expression edit line and set this option
- (for more details see "Examples, Tips and Tricks").
-
- -g (grep) : The match (in the output file) is included within the two
- "Mark left/right" edit field strings.
-
- -h (hide) : Hide and seek? Return to count! The filename is hidden.
- Useful for filtering text.
- Attention: Option -h excludes the option -l. Logical,
- ain't it?
-
- -l (list) : If there is a match you will ONLY get the filename.
- Attention: Option -l excludes the option -h.
-
- -m (more) : Length, time and date of the file are added to the filename.
-
- -n (number): The output lines start with the line number (the number in
- the original file of course).
- Example:
- 123: Output line.
-
- With a double click on the line number you can jump right
- into the original file to the according position (see "Use
- of Output Window").
-
- -p (point) : The output starts at the beginning of the match.
- Example: Line read = "Have a nice day!"
- search for "nice"
- Output = "nice day!"
-
- -u (unix) : We are not talking of unic's! It just means that all lines
- in the output file end with LF only instead of CR/LF. That's
- useful for transferring files to Unix systems (see Examples,
- Tips and Tricks).
-
- -w (word) : There is a match only when the searched for expression is
- found as a word, i.e. when the character before AND after
- the expression is NOT out of [a-zA-Z0-9_].
-
- -y (onlY) : The output ends at the end of the match.
- Example: Line read = "Have a nice day!"
- search for "nice"
- Output = "Have a nice"
-
- The combination of -p and -y gives you the match only.
-
- -z (zero) : All lines which do NOT contain the searched for expression
- are written into the output file.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡'SETTINGS' DIALOG≡
-
-
- Lines (max.):
- Maximum number of lines the output window can display. If the file to
- display is longer, GREPIT tries to adjust this value automatically -
- but this will take time so we recommend to increase the value if
- you have many long files. The number of lines, times 4 is the amount
- of memory used (for example 6000 lines x 4 = 24000 bytes), because
- GREPIT loads the files virtually (only pointers to lines) to display
- also large files at low memory.
- Remark: This value only concerns the files to be displayed in the
- output window, not the files to be searched in (they may be of any
- size).
-
- Tab width:
- Tab's are expandable.
-
- Main dialog at program startup:
- If you set this option the main dialog appears automatically after
- the program starts. Look how much time we try to save you!
-
- 3D effects:
- The 3D effect can be activated on color resolutions with 16 or more
- colors. If you can't deal with it, just shut it off ;-) !
-
- Auto save settings:
- The complete settings (input lines, history popups, window positions
- etc.) are saved automatically every time you quit the program. A
- highly recommended option!
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡'FONT' DIALOG≡
-
-
- You can choose the font and its size for the output and help window. If
- GDOS is installed, GDOS fonts (except proportional ones) are displayed
- and supported.
-
- Hint: Not all GDOS fonts cantain all of the characters. But be opti-
- mistic - 10% of the characters aren't missing. You just have 90% to
- work with.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡'COLORS' DIALOG≡
-
-
- I didn't know colors could talk. But in this case you can set the colors
- for window background, window text, paths, line numbers and expressions
- as well as the headlines in the help function.
-
- In reference to colors... Welcome to the 90s. Don't breathe the air.
- Don't drink the water. Don't eat fruit, vegetables, meat, fish, sugar,
- salt, fats. Don't have sex ever again. No more monochrome resolutions.
- Have a nice day!
-
- But we stay old fashioned by letting GREPIT work in monochrome. But
- invert found expressions.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡'FIND' DIALOG≡
-
-
- Come on you know this one. Just enter the expression to be found in the
- output window ... The search always begins with the first visible line
- in the window.
-
- If the expression is found, the line will be inverted. If no expression
- is entered, all find variables are reset, an inverted line disappears.
-
- The options are common, too:
-
- [Backwards]:
- Search to the beginning of the text. It's automatically switched
- into this mode after reaching the end of the text.
- [Ignore Case]:
- Capital and small letters are ignored.
- [Whole Word]:
- There is a match only when the searched for expression is found as
- a word.
- [Regular Expression]:
- The expression is interpreted as a regular expression.
-
- You can repeat the search with >Control-G<. In this case search will be
- continued with the first visible line in the output window except there
- is a found line shown in the window. Then search goes on with the line
- after or before this line (depends on the last active search direction).
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡'MARK EXPRESSION' DIALOG≡
-
-
- The expression entered in this dialog is highlighted throughout the
- output window with the color you have set for expressions in the
- "Colors" dialog.
-
- The options are:
-
- [Ignore Case]:
- Capital and small letters are ignored.
- [Regular Expression]:
- The expression is interpreted as a regular expression.
-
- After every grep process the first expression entered in the main
- dialog is marked automatically. This feature allows you to quickly
- make any expression in the output window visible without starting a
- new grep process.
-
- If no expression is entered, no expression will be marked of course.
- Tah-Dah!
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡'PRINTER SETTINGS' DIALOG≡
-
-
- You can adjust GREPIT to your printer here. Please enter the values
- (escape sequences) in decimal numbers, separated by commas. The
- sequences in detail:
-
- 'Description':
- No special meaning, just for information.
- 'Init Text':
- Sent to the printer before everything else. Normally used for
- printer reset, font and line settings etc.
- 'Exit Text':
- Sent at the end of printing. Used for form feed and printer reset.
- 'Init Page', 'Exit Page':
- Sequence at every page start and end. The exit page sequence
- (usually a form feed = 12) is sent after the number of lines
- entered in 'Lines per page' edit field in the "Print" dialog.
- If you, for example, don't set a form feed at 'Exit Page', the
- value in 'Lines per page' has no effect.
- 'Init Line', 'Exit Line':
- Sequence at every line start and end. For example 5 x the value 32
- as init line makes a left border of 5 spaces. For line exit the
- standard setting is normally '13,10' (13 = Carriage Return, 10 =
- Line Feed).
-
- The remaining 2x8 edit fields are for changing critical characters by
- replacing characters with printer sequences.
-
- With [Load] and [Save] you can write (and read from) the printer setting
- to a separate file (default extension is *.DRV).
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡'PRINT' DIALOG≡
-
-
- Print the file presently shown in the output window. You can use the
- parallel or serial port. You can also set the number of lines per
- page and the number of characters per line.
-
- Hint: If you don't set a form feed in the 'Exit Page' sequence of the
- printer setting, the value in 'Lines per page' has no effect, i.e.
- the printer ejects the paper by itself and you will always get the
- maximum number of lines on a page.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡REGULAR EXPRESSIONS≡
-
-
- Attention and concentration please, here comes the most difficult part
- of this manual. This is our implementation of Regular Expressions:
-
- ^ - The circumflex as the first character constrains matches to
- the beginning of lines.
- Ex.: 1) "^blahblah" matches lines beginning with "blahblah".
- 2) "^" matches all non-blank lines.
-
- $ - The dollar sign as the last character constrains matches to
- the end of lines.
- Ex.: 1) "blahblah$" matches lines ending with "blahblah".
- 2) "^blahblah$" matches lines consisting of the single
- word "blahblah".
-
- . - The period represents any single character, like the DOS
- wildcard "?".
- Ex.: "Hun.er" matches "Hunter", "Hunger" etc.
-
- [a-z] - Character group. Represents any character of this group or
- of the given range of characters. Important: A range of
- characters must be given in ASCII order (A-Z, a-z, 0-9 etc.).
- Ex.: 1) "[0-9]" matches all digits from 0 to 9.
- 2) "([0-9]+)" matches "(76)", "(56789)", "(4)" etc.
- (for the explanation of the "+" specifier read on)
- 3) "^[A-Z]" matches lines starting with capital letters.
-
- [^a-z] - Negative character group. Represents any character NOT in
- this group or not in the given range of characters.
- Ex.: "Gre[^py]" matches "Green", "Great" etc. but not
- "Grep", "Grey" etc.
-
- ? - The preceeding character or the preceeding character
- group may occur 0 or 1 times. Not to be mistaken for the
- DOS wildcard!
- Ex.: "bla?hblah" matches "blhblah" or "blahblah" but not
- "blaahblah"
-
- * - The preceeding character or the preceeding character
- group may occur 0 or more times.
- Ex.: "bla*hblah" matches "blhblah", "blahblah", "blaahblah"
- "blaaaahblah" and so on...
-
- + - The preceeding character or the preceeding character
- group may occur 1 or more times.
- Ex.: "bla+hbla" matches "blahblah", "blaaaahblah" etc.
-
- \ - Quote next character. This allows all the above mentioned
- regular expression specifiers to be searched for.
- Ex.: If you want to search for "*" you have to write "\*".
-
- ATTENTION: Search for line separator characters (Carriage Returns and/or
- Line Feeds) is not yet supported at this time.
-
-
- Input of expressions:
-
- You normally just enter the expression(s) in the "Expression(s)" edit
- field of the main dialog. But, for very long expressions or many of them
- you can use an external expression file. Write all expressions line by
- line into a file and use the extension .GRE (GRepit Expressions) for it.
- Simply type the file's name in the expression input line of the main
- dialog and activate the switch "-f" in the "Extended Options" dialog.
- An expression file may contain up to 256 lines with a maximum length
- of 256 characters each.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡SPECIAL FEATURES≡
-
-
- ∙Messages from GREPIT to other programs∙
-
- If you double click on a file name or file path with the right mouse
- button, GREPIT sends the message GM_SHOW_FILE (8000) to the main
- application.
-
- For programmers:
- pipe[0] : contains the message ID 8000 (GM_SHOW_FILE).
- pipe[3] und pipe[4] : contain a pointer to the file name.
- pipe[5] und pipe[6] : contain the number of the line to be displayed,
- as a long value.
-
-
- ∙Messages from other programs to GREPIT∙
-
- The above described procedure also works vice versa. If GREPIT receives
- the message GM_SHOW_FILE it will display the file.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡EXAMPLES, TIPS AND TRICKS≡
-
-
- ∙Converting to and from UNIX∙
-
- Problem : You have an ASCII file from a UNIX system. UNIX uses only a
- LF (Line Feed) for terminating lines, but TOS normally needs
- the CR/LF (Carriage Return / Line Feed) combination, therefore
- you should convert the file.
- Solution: GREPIT can read both types of ASCII files but the output is
- always in TOS format. Just enter the UNIX file name in the
- 'Source(s)' field, a different file name in the 'Destination'
- field, use the regular expression ".*" which matches all lines
- and disable all options except the "Regular Expression" option
- in the main dialog.
- Example : Source(s) : C:\UNIX.TXT
- Destination : C:\UNIX2TOS.TXT
- Expression(s): .*
-
- or
-
- Problem : You want to transfer TOS ASCII files to UNIX systems.
- Solution: Do it like the above mentioned and set the flag -k in the
- "Extended Options" dialog. This option lets GREPIT add
- only LF instead of CR/LF to line endings.
-
-
- ∙Extracting of C-strings, comments, hex values or functions∙
-
- Problem : You want to extract all strings out of a C-project and you
- want to get the strings without the rest of the line.
- Solution: Use the regular expression >>>".*"<<< to find all lines
- containing anything in quotation marks. To fade out the
- rest of the line, set the options -p and -y in the "Extended
- Options" dialog.
-
- or
-
- Problem : You want to extract comments in a C-project.
- Solution: Use the regular expression >>>/\*.*\*/<<<. Remember: "*" is
- a regular expression specifier and you must set a backslash
- in front of it to be interpreted as a normal character!
- Suggest.: Begin your C-functions with a header, for example:
- /*****************************************/
- /* Function name: Description */
- /*****************************************/
- Now you can extract these headers with the above regular
- expression.
-
- or
-
- Problem : You want to find all hexadecimal numbers in a C-project.
- Solution: Use the regular expression >>>0[xX][0-9a-fA-F]*<<<.
-
- or
-
- Problem : You want to find all functions in a C-project.
- Solution: Use >>>^[a-zA-Z][a-zA-Z]* *.*([^;]*)[^;]*$<<<. Confused?
-
-
- ∙Search by using expression files (lists)∙
-
- Problem : You want to extract all calls to GEMDOS functions in your
- C-project.
- Solution: Write the names of all GEMDOS functions to a seperate text
- file (for example GEMDOS.GRE) and set the flag -f in the
- extended options dialog. GREPIT will search for all
- expressions listed in this file.
-
- There are some sample files in the folder "GRE" of the
- original GREPIT archive.
-
-
- ∙GREPIT as a file finder∙
-
- Problem : You need to find a file on your harddisk but you can't
- remember the exact name. The partitions on the harddisk are
- C:, D:, E: and F:. The file name begins with "A" and has the
- extension ".TXT".
- Solution: Source(s) : [CDEF]:\A*.TXT
- Expression: .*
- Flags to be set: -d Search subdirectories
- -l List only file names
- (The regular expression ".*" matches anything.)
-
- To find all ".TXT", ".DOC" and ".TEX" files on drive C: enter:
- Source(s) : C:\*.[TXT|DOC|TEX]
- Expression: .*
- Flags to be set: -d Search subdirectories
- -l List only file names
-
-
- *** !!! ***
- If you have more ideas to utilize GREPIT, let us know! We will collect
- and distribute them with GREPIT for the benefit of all GREPIT users.
- *** !!! ***
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡KEYBOARD SHORTCUTS≡
-
-
- ∙Basics∙
-
- Basically all elements in a dialog box with a underlined character in
- the text can be selected by typing the underlined character combined
- with the 'Alternate' key on the keyboard.
- The button with the thick black border is the default button and can
- be selected by the Return/Enter key.
- A [Cancel] button corresponds with the 'Undo' key, a [?] button with
- the 'Help' key.
-
-
- ∙In the main dialog∙
-
- 'Insert' : To store an entry into a permanent history popup.
-
-
- ∙In the output window∙
-
- Arrow up : scroll up
- Arrow down : scroll down
- Arrow right : scroll right
- Arrow left : scroll left
- Shift and arrow keys: page scroll
- ClrHome : beginning of the file
- Shift-ClrHome : end of the file
- Control-ClrHome : adjust window size to maximum and back
- Control-F : find expression in window
- Control-G : repeat find
- Control-P : print file
- Control-U : close window
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡HELP ON HELP≡
-
-
- The help window can also be used with keyboard shortcuts:
-
- Arrow up : scroll up
- Arrow down : scroll down
- Arrow right : scroll right
- Arrow left : scroll left
- Shift and arrow keys: page scroll
- ClrHome : beginning of chapter
- Shift-ClrHome : end of chapter
- Control-ClrHome : adjust window size to maximum and back
- Undo : jump to contents
-
- ESC, Control-Q, Control-U or 2 x Undo: Close help.
-
- In the table of contents, a click with the left mouse button on a
- chapter headline displays the referring chapter. Return to contents
- with a right click anywhere in the help window.
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
- ≡GETTING REGISTERED≡
-
-
- The program GREPIT is used for pattern matching and string searching in
- files. Through the use of regular expressions GREPIT can provide you
- with search patterns however complex they may be. These patterns can be
- searched for in all types of files.
-
- GREPIT also provides you with many options to vary or specify search
- and output. GREPIT is a powerful tool mainly for those who deal with
- many texts, as in the fields of software development or electronic mail
- /communication etc.
-
- GREPIT lets you easily jump into (and back) the found files just by
- clicking on a file path or line number in the output window.
-
- GREPIT is (or will soon be) available for various platforms in addition
- to Atari TOS as MS-DOS, MS Windows, Windows NT, OS/2, NeXTstep, Apple,
- Unix ...
-
- There are NO restrictions in unregistered state. Only the info dialog
- will appear at every program startup as an evaluation copy reminder.
-
-
- ----------------------------------------------------------
- ∙REGISTRATION FEE: US$ 20,--∙
- ----------------------------------------------------------
- or the equivalent amount in your local currency.
-
-
- Follow these steps for registration:
-
- 1) Send us the form ORDER.TXT (E-Mail, FAX or snail mail) with your
- adress and way of payment
-
- or
-
- You are a CompuServe member. Then just type GO SWREG and register
- online. Enter GREPIT's registration ID #3130 when prompted. The
- registration fee will be charged to your CompuServe account.
-
- 2) After receiving your payment we will send you your serial number
- and registration code.
-
- 3) Click on [Register!] in the "...about GREPIT" dialog and enter your
- name, serial number and registration code.
-
-
- And here is our adress:
-
- MicroService Hermann Wierl
- Bahnhofstrasse 8
- 93336 Altmannstein
- GERMANY
- MO-FR 9-12 a.m. and 2-5 p.m. CET
-
- Phone and FAX: +49-9446-2149
- E-Mail: CompuServe 100345,2231
-
- We can also be contacted via private E-Mail adresses:
- Hermann Wierl @ R (MausNet Germany),
- Hermann Wierl @ 2:2494/315 (FidoNet),
- which look like this as Internet adresses:
- hermann_wierl@r.maus.de
- hermann_wierl@f315.n2494.z2.fidonet.org
-
-
- Please note: After successful registration a file named GREPIT.REG is
- created with your data. Please don't include this file when copying
- because it contains your personal data!
-
-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-